changed output type back and added Printer class