change client from class to object