reduce struct
change config initiation place