added support for iPad and orientation