implement master-checkbox functionality