add main_type field
fix merge