oh God, in-place typechecking!!!