extracted config parser into separate class