cleanup code to get/set result_attributes