refactor configuration initiolization to visitor pattern concept