change page_main functin