working stab with heuristics