now serializing custom types in message class