CHANGED: algorithm for nth-root