finding roots