performance improvement: using ObjectClass instead of passing the message object