started adding threading to client (2)