Adds the parent id and makes a working tree until mechanisms