added sequence_max