refactor - stage 1