more robust deserialization - WIP