complete working example