Added code for rotatted view.