added methods for getting digits of a number and to check if numbers is a palindrome