added MessageInfo constructor for consistent message handling