implemented reverseString and findSuffix