heuritic 2 bug fix
heuristic3 - some improvements