adding handler for pub package
adding publish test for pubsub and fixing bugs test revealed