fix and pass all tests