Shayan/upstream sort reader