maxseqno -> 0-indexing