this is a ruby method to reverse a string.