refactoring - using app run block
refactoring - using app run block and Inflector