forgot to change the index bound check from a negative to a positive