adding functionality for checkbox questions