makes the power function recursive