Implemented conversion of stream data into the existing data structure
Modified the constructor