updated exponentiate to include raising by logs