finished client and server