packet input stream is neary finished
added some TODOs