add new feature and fix bugs