adds checkbox's toggle method