modifying parsing to use mongo db