add support for orientation changing