put subscribe before notifying; refactor