finish the mainpage of GUI and three sub pages