finished coding the client