refactoring methods