rewrote output to the console