slight refactor to remove one line