minor refactor from review