re-factoring: link & unlink routines simplified