added result inner class for palin