Passed all the test cases, but code fails when submitted... awesome.