using tree in gammar