minor changes to power of function