add factory to generate all strings of length n