In this lesson, we're going to discuss how we can supplement Schemas by using different Accumulator Operators. And specifically, we're going to look at how we can enhance our documents by adding different calculated fields to them. And then by adding those calculated fields, we'll see that kind of usefulness that that provides us when we want to perform some additional analysis. So here, like always, I'm going to go ahead and import pymongo, and then go to connector In's cluster. We're going first to use the orders collection. And just to remind you what this looks like, here's an example document. And you can see here that we have this a purchase array where we have these different individual items that were purchased. Now there's some information that's embedded in this document, just this one single document, that might be useful to us if we had access to it very easily via a field. Maybe, for example, we'd want to know the total quantity for an order. So, we knew how many different products people are buying when they placed an order with us. Or maybe we really care about knowing how many separate items they were purchasing. So, not how many total items that are purchasing, but rather how many separate unique items they are purchasing. And we can actually go ahead and add this information to every document in the collection by using addFields. And then very simply, we can say the name of the field that we want. In this case, total_quantity. And then we're able to use a accumulator. Rather than using the accumulator at the collection level across multiple documents, we can use the accumulator on one single document, when it's specified inside the addField stage. So, we can go ahead and add up all of the items in the purchases array field on the embedded field quantity, and put them all together and sum them up into this total_quantity field. Similarly, we can figure out how many total distinct items were purchased by just using the size operator on the purchases array. And then here the end, I'm limiting to one just so we can see what this looks like for that same exact document. And as you can see, we had the same document that we had before. But now, we have this num_items, much says three because there are one, two, three items. And then we also have the total_quantity field, which tells us that there are 236 things purchased. That's because that's 36 plus 100 plus 100. But we can also do more complex things. Here, I'm going to go ahead and switch over to the employees collection. And in the employees collection, what we have going on, as you can see, that we have basically a document describing an employee. And one of the fields is employee_compensation, which contains all of this interesting information. And two of the fields in here that are particularly interesting are salary and stock_award. And these are both cash and cash equivalents, because let's assume this is a publicly trade company, that make up the employee's total compensation for a year. And so maybe, we'd want to add a field called, total_compensation. So we have underneath the employee compensation embedded document we could add a field called, Total, where we just use the aggregation sum operator, and we pass in both the employees' salary, as well as the employees' stock_award. Sum those two together. Again, we're using limit to look at the same document. And very easily, you can see that now, we have a total field inside of employee compensation. That is really just the sum of these two numbers. And while by itself adding fields like this aren't necessarily very valuable by themselves, the real value comes from when you combine them with additional aggregation operators. For example, here, I'm using a group stage. So I'm first able to go ahead and figure out the total compensation for every employee. And then, I'm able to pass it to a group and I'm not grouping on any specific field, rather, I'm grouping on the entire collection. And now, I'm able to find the average total compensation for all employees, which we can see is $132,903,42 and three-tenths of a cent. And this is where the real power of adding accumulators into your aggregation pipelines to enhance your Schemas. So in summary, we were able to see how we were able to add calculated fields to enhance documents by using addFields. You can also do it using project. And then using accumulator operators that you would normally use against an entire collection on just fields that are a part of a single document. And then by creating this calculated field, we really are able to perform a lot more useful analysis, because we're able to utilize those fields and aggregate across all documents to get aggregated and calculated values.