extracted root check from lookup