begin with sorted file