Altered Generate method to return string array