add pub/sub patterns