substantial work on User_Defined_Stream_Type