removed local getch & ungetch declarations