radically more efficient (I guess same 'worst case', but only calculates when necessary. could narrow the heuristic a bit for 'whats necessary', but this is good enough for now)