first serious try to write dirtyupdate script