refactor serial rdr