added examples to Davids algorithm