added frame delay option