added the output function to have them all in one example script.