added exponent and root functionality