use bytes reference to read data from network