structured code for config