almost working heuristics