updates for Palidrome.java