removed the autopublish and implemented pub-sub for notes