the adjoint still needs to be applied
changing inv_step to step