added the ability to pause