refactor for readability.