switched terminal task to use getchar instead of function pointer