updated main.py with delete functionality