fix bug and figure out next link to visit