refactored to use mechanism similar to messaging but with spark primitives instead of aggregate messages