refactor tree to work without an input mesh