add somes typechecking to pass lasts bad tests