rebuilt with improved Reader API