changed messages to use serialization