Added makeXConfig function