wrote deleteElements, cleans up dynamic memory for lists during copying, and for use in the destructor