modified insert_db.py