if (!contain) ... else if (contain && ..." is a little redundant.