passing array to publish instead of variable