a pubsub library to avoid duplication of listening events