updated server code samples