ragistry refactored