replace link script with clone and link script