- add checkboxes for testing too
- factorise some code into a createInputElement() function