further refinement on client handling