removed sys
not using EventEmitther to get data on the same tick
partEnd and end
indexOf using Buffer
slice and not substr