add method of reading config