wrote root reading logic, still need to figure out ranges