Is there any other way where I can specify orientation? I can get rid of the above method.

Thanks.