change message into an object