changed deserialisation method.