added direx which can use directry tree