Updated power function.