remove and update must be called on document in order to trigger middleware