add check_babai_heuristic and helpers