+ refactoring header matching code, now works for both Fenix and Migdal