update reader and fix tests