Modified PowerMethod.java