adapted to a better automatic clone and update