add context in init function, pause, resume

add pause/resume function
add context pass
add more example