handle multiple orientations.