improve readability in reader and test_reader