new handleData function in kernsink