application model and factory passing