improve link script, add unlink script