added new orientation calculation