added a delay option