added splitting of received data

still looking for a better and shorter solution