added a version 2 of apply invocation method