palindrome checked without using loops