version 5:  all test cases passed