rewrite modal stage to handle sequences.
modal pagination and sequencing.