making clones deep in toJSON()