refactoring stage 1
refactoring stage 1