codeeval.com calculate distance commit. added test cases for later optimizations