Added variable step size