refactoring 1st step