boolean comparison
produce functions use const references to avoid copying parameters