correct sample application controller after refactoring