replace directory names with variables