cleanup whc code
use bool type where it has sense