Refactoring for the click checkbox methods