First working version with example