refactoring for style