load.py, courtesy of Ty