modifyList2 function

modifyList for multiple lists