refactoring for new features