fix some bug, add some new features