added power(double value, int n)