adding an event listener for orientation changes