splitting data into packets