cool heuristics added, minor changes