reverse_strings function