second commit
fix some bugs