removed "task" parameter in runGen() as this was not working anyway