Updated step-1 solution