error of array index out of bounds