How can I set logical AND OR conditions?