functionality added for checkbox