adding code for the client