adding interface for reverseText function
used a for loop to reverse string