scandir done
main modified