Now handles nested lists.