re-calculating container similarities