Is Valid is working

We need to get our heuristic fast enough. It keeps timing out.