updated server function to "serve" for python http server