added -delete flag