Modified to return both square roots