combine check and checkAll methods