refactored edi parser for new db