change the direction of page