modified the step mechnism to a generic functionality