properly cast Message to SegmentEntry and SequenceEntry