added a listener for orientationchange