added QoS 2 support.  added subscribe support to API