added getchar