updated server and server functions