Add client util to reduce code duplication