a little refactor
add maxpalindrome of dynamic programming