functions for dynamic link tab