added load_inst_from_file method for deserialization