refactor, stage 6