added test for inline calls and resolved some bugs