changed debug.py to load into database