refactoring and more features
improved features