trying to fix issue with the array