updated stage 1 functions