finish prototype of http server