initial dir setup
inefficient 1st iteration