get gap from tree