refactoring more!