casting and logical operators