added dynamic dir finding