solve orientation problem