works on directory of pictures