Added an example function with guards.