code reffactor step2