simplified the apply an orientation lock algo