type should be Document