pwr function added