add make file and modify some bugs