pass config as reference