fixed bug that fixed my singular matrix problem. Trying to clean up compute_jacobian now