need to work on the sorted read from pile