patterns if