added function for symlinks that works for files and folders