change the struct initializing method