added a little more documentation in ui.R