improved smart links lib