added new method of reversing a string