added proper event handling for checkbox element / added check mark