refactored post_process.py, moving match splitting into a separate function