Changed the rotational mode to return z value instead of passing pointers