add legend and download mechanims