updated all links to one another

incorporated a bit of Matt's SQL code