updated array out of bounds error