implemented basic subscribe method
updated spec of pub/sub