modify print to cout