added generate method to return the string
housekeeping