move history enumeration code into a separate module and add untested brute force feasibility functions