implement client handeling