add more conditions to distinct directories