Writing top-level logic - publisher