finish getchar and getstring