implement link addition/removal
eliminate query for link existence check