added method-call test case and misc fixes