read config method