updated debug.py for testing