convert bool to cpBool use conditional operator