simplify delay function
Merge pull request #5 from GavinJoyce/gj/simplify-delay-function

simplify delay function