added dir index support