Implementation of onclick listener for check boxes