review and small refactor