add and modify some test code