changes from fork-and-watch implementation to notify/callback approach.