reversing the array