added option for changing delay