adding check on click