added ReverseString class. move reverseString method into it