change to use named roots as well