would be nice to extend the standard example rather than repeat it all here