set up recieve and publish