add device rotation handling