Adding server code