minimizing number of files