refactored application model