added save method and _rev and _id