added reset_sequence function