added support for touch-screen and screen rotation