suggested refactoring