casting from Bool to Int working