Updated Orientation Code