inject delay into callback function