add 'select all checkbox' + tweak code