A more complete example added.