moved self link generation