avoid unecessary loops when parsing configuration