reverse array for set