factor out translation of booleans