private static boolean isPowerOf(double power_value, double user_value, int range) {

        double[] powersList = new double[range];

        for(int i = 0; i < range; i++) {

            // generate powers of list
            powersList[i] = Math.pow(power_value, new Double(i));

            // if the users value is stored within our array list of values, return true
            if(powersList[i] == user_value) {
                return true;
            }

        }

        return false;
    }