implement pause/resume
context2d tweak