update delay.py to be batch / single file