adding directory support