slight refactor for readability