code for step1