fix deserialization
convenience function