Refactor for legibility