deserialize incoming messages