changed to double precision, still numerical gradient differs a lot from analytical