made it work with the server