implemented power()