use power() instead of for()