added ability to set 'this' context for the invoked functions