introspection for sum method for oo classes