Just adding a quick fix to the method generate_string
Adding some methods to test the function generate_string