Complete example in beginning of algorithm section