Assigning logic statement to variables