use array is not a good idea for generating a great number of codes