implemented exponent function