Add deserialize method