app refactored