add attach struct to class enc