Add David's implementation.