update sequence.cpp