make data reader better; bug fixs.