was filling in the wrong array.