Added support for orientation