add constructor for data reader