refactoring ui to use checkbuttons etc