refactored sqrt to n-root with empty n