implemented legend for map