recursive exponentiation