added legend and layer controller