modify generateList.m