changed api to support ats structs