add config files for primary and secondary arch
convert the code to optparser