add low bound check