solved, revisit for sequence generation