removed duplicates using blocks