corrected error in code for setInterval for power