web server : refactor