Changed the example function to one that does what they asked for