first refactoring steps