generate all codes