modify some bugs, and now this program can run