change match algrithm
and read files from some directory