yuck.  adding with booleans is rather opaque trickery.