added Brian Bolt's version, with modifications for ui.R - style dashboard generation