refractor data reader
bug fix.