Added exponent parameter to methods (had been working without parameters because of hoisting)