adjust main page direction