made more on handling of the device rotation switch