layered function invocation