speed improvement for method invocation