Working version with example.