Added pause functionality