updates to the server code. Still not working yet but getting closer