restored loader.py