improve the main func of typing information