changed output function