updated pause button behaviour.