Added pause functionality.