Refactro pow to make it simple