Update functions

add function for exponentiation