v2: typecheck done