added a data input decorator to improve the stream reading