better way to read config