added the delay setting as a paameter of the init function