added sort to get_headers_and_readers