Adding pause routine in the finalized code