first steps to refactoring code