update code involving movedUnits (now renamed to movedPaths)