gradients made cleaner, important floats converted to np.float64