finalize client