move "ln -sf" emulation to a function