set up the mode for the main page