added recordexp with typechecking