work for some test cases