Trying to create assemblies from family and sub-elements

I am trying to create a dynamo script that will pull the element and sub-elements and create an assembly out of them. I have gotten to the point that it sees the elements and prompts the name but i cant get it to actually create them. what do i have to add or change to get it to work? I have limited knowledge with dynamo but trying to learn!