modifying dbi.py to use callbacks on modification