added queue_pause function