working common_items2 function