add delay and sleep.
add pause and resume.