Updated the db.py file