solved deep copying issue
added support for set collections