changed logic. dropped referer in favour of individual links