Adding loop to support multiple sentence generation