fixes (some test cases don't pass)