Refactoring stage 3
refactoring stage 4