why does this need to be in its own variable? Why can't you just use instance.messageId directly?