added link_by_names function to locations.c