Quick fix

Hi Og,
I just added a quick fix to the method generate_string. The method was not returning any values.
I just add a quick fix and wrote some tests for it.