reversing array and lists