added deserialization from stream.REadable