change pow to handle basic complex case