adding scripts to trigger subscriptions and publications