added support for linking