oh, i see, for passing in a list, this code is slightly tricky to read, add a comment please