implemented pause, fixes #1