Changes to substituting to use lists in lists