switch to a pub/sub model