Added code for exponent