implemented pause/resume, simplified original pause/resume

Signed-off-by: Christian Lüthold <biocodr@gmail.com>