efficient construction of candidate strings