Figuring out right conditional statement