finalizing client