server implementation v0.4