Some optimizations. User can now input length of generated string