Refactoring(stage 1)