fix some bugs and create a new file