added stage 1 functionality