implemented discover dirs