Refactoring for better readability