Added example() to demonstrate functionality.