Refactory stage 1