new function for handling custom messages, allows objects to be sent, be...

...fore we only allowed strings