added switch statement and started scanner (curious is scanner should wait and be written using output)