added functionality to add checkboxes and links to foobar with event handlers