added toObject to tags