changed operator to a &&