Modified insert.py