Replaced hasItem with contains