fixing approximate ik calculation