re-factored link select on click