Change delay to be a function