found issue with adjoint code, working to implement an auto differentiation
package to use with variational techniques