deal with BOM more properly