Debugging. Passes all but 2 test cases.