works on his test cases