avoid printing names twice