make function dir