rewritten with 'invokeMethod'