converting to use registryapi