test plindrome and interacting with I/O