web server logic