increased performance of output function