versions of sorters which read from files