fixed code, 3 tests passed, needs more tests