finished and typechecked