added an example and testing