refactoring after first feedback