working on connection onData handler