initial single thread server implementation