Rearragned  commands execution steps