Working sample code.