corrected the client side functions from the server