All of the code that does any work is in the when_invoked.  So this seemed the appropriate place to put it.