modifying db.py