split code out into separate listen and publish files