removed getchar()