pass all PA2 test cases