modify some function return type and test cases