use S4 inheritance less stupidly