can generate random 1-dimensional code