swapped to counting vertices