follow the #'s in the comments, I wrote it to be linear in this order: 1->2->3->4->5->5a->5b->5c in a main function that calls a second function at step 5. current error is due to my misuse of ObjectId on line 122.