Added application Factory approach