reduce contains and every functions