somewhat finished the client