change to add BOM with binary function