improvements to nested lists
demo of the nested list function