This $contains or not logic should go in a separate method, instead of this `break`.