slight change in output function