delete unnecessary getchar()