updating global orientation