any chance to pass the class name to func instead of cid, eliminating this query?