simplified code in method `getSteps`