heuristic constructor detection