change the director and modify some code