cleaning up the server side