Made exponentiate() void