* made it thread safe and implemented wait
* made it topic-agnostic