Added pause function.