add directory support