refactoring to work on