replaced map with forEach in publish spec