finish typechecking.