use a funtion to create dirs with default attr