modified controller to persist link data