implement sendSubscribe(), sendPublish(), handleNotify(), not sure if
they are correct