implemented initial version of data reader