fixed up the demo to work with different screen rotations