refactoring - added application controller