add versioning to identity; add generic 'client' function