write main page