refactored new mock app factory