implements a simple pub/sub channel