swap then reverse