calculate pow