auto select checkboxes according to element value