Working on orientation calculation