final hw3, didn't pass all tests