add package
fix some bugs