create a scanner for input/output