added tree import and cleaned syntax