Add variable delay functionality