first working server implementation