updated db.py to overwrite