Added new implementation for generating strings