Complete example code