added last digit in a^b test