refactoring for more readable