cleaned up the server side boilerplate