modified mainpage to use html template