added checkboxes on legend