just refactored createNodeForMethodCall functions.