fixed pow bug
fixed merge conflicts: