Refactor for improved readability