sequence length table condense code