refactor of applicationContext