add links and legend