implement boolean -> int conversion