added flatten directory post