added code for appendix D, pinned mongo and twitter module versions to prevent build issues