minor refactoring
The "function call" feature added and some testcases are modified