the server side code