separated inspect part from deep-first