completed collecting candidates function