completed reverse_string.rb