reverse and reverse_copy and tests