main page codes