you should be able to just copy lists and maps instead of having to declare a new empty one and pushing all the items from the previous one inside.