updated link_to helper to handle target reference