working version with changes monitored