Corrected the use of Math.pow()