gentry: move app logic to viewcontroller