add some new feature and make code look good