first steps of refactoring based on feedback