re-factoring stage 1