implemented most of the server methods