unifying K methods
fixed bug on K array size
fixed a bug in dK_dtheta
two more grad tests