fixed adjoint, updated scripts