helper function for setting the delay - a litte tidyup if you will