fixed some input bugs ---- Need to make new getchar function to get a single character at a time