yeah, it passes all of the tests but i knew it wasn't 'right'.

So, for example, I took the array for the second test and swapped the first two elements - that broke the script. So i fixed it up a bit, because it bothered me. I'd rather have it working all of the time as opposed to just against the test cases.

Maybe i'll get back to golfing the 317 code tonight a little bit (or maybe come up with a new approach all together)