add BOM detection