replaced 'publishTo' func with arrow function