moved declare/remove from private to main class
moved publish from private to main class