Simplification of getRoots method