assigning result of if statement