added pause and unpause