performance improved for deserializing units