make the sequence zero based