refactoring the structure (step 5)