updated to rip open string class instead of creating palindrome class