adding orientation checks