small refactor according to review