flatten directory structure as discussed