add power function solution