working on PackedInputStream