readStep function added