test function invocation pattern