tweaked step1,step2