Added function to send object message

If the message is an object send it to another function (test)