registry refactored