added addClient functionality