change scanf to getChar()