first version of ImageSorter