some refactoring. add decorators